Skip to content

Conversation

@florentc
Copy link
Member

@florentc florentc commented Nov 6, 2025

This addresses #647.

This feature introduces a toggle (by default on) to be notified about new suggestions involving packages a user maintains, even if they have not manually added it in the subscriptions center.

2025-11-06 18-09-07

Notifications mention that you are notified because you are a maintainer
2025-11-06 18-24-06

@florentc florentc force-pushed the fix-647-auto-notification-maintainers branch from 08bafbd to 652cd31 Compare November 6, 2025 17:28
@balsoft balsoft self-requested a review November 7, 2025 14:31
notification_reason = []

# Check if user is subscribed to any affected packages
if user in subscribed_users:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that subscribed_users here is a list, which would make this and the ckeck o line 91 a bottleneck for popular packages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7fd96cb

if maintainers_github:
maintainer_users = set(
User.objects.filter(
username__in=maintainers_github,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to have another JOIN here instead of fetching all GitHub handles into Python just to send them back?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 82ee088

if action == "enable":
if profile.auto_subscribe_to_maintained_packages:
return self._handle_error(
request, "Auto-subscription is already enabled."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be an error: if response to one query was lost and user clicked on the button twice, it should still be fine as long as we reach expected state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in dcc4cc3

@florentc florentc force-pushed the fix-647-auto-notification-maintainers branch from e3e4aac to 82ee088 Compare November 18, 2025 10:44
Copy link

@YorikSar YorikSar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@florentc florentc merged commit 1316ff8 into NixOS:main Nov 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants